#ifndef __SNAKE_APP_H__
#define __SNAKE_APP_H__
#include "sys.h"

#define MIN_Y 16
#define MAX_Y 63
#define MIN_X 0
#define MAX_X 127
#define Trig_Angle 15

typedef struct snake_struct
{
	u8 x;
	u8 y;
	struct snake_struct *next;
}snake;
enum snake_direction{
UP, DOWN, LEFT, RIGHT
};


void snake_play(void);
snake *snake_init(snake *head);
void snake_display(const snake *head, int score);
snake *snake_move_one_step(snake *head);
float my_abs(float num);
snake *snake_del_tail(snake *head);
int snake_head_judge(snake *head);
void snake_release(snake *head);
int snake_bite_self(snake *head);
void snake_create_new_food(snake *head);
int snake_food_vaild(snake *head);
int snake_food_at_snake(snake *head);
#endif

